package com.ktjy.pojo.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;

/**
 * 系统用户表实体类
 *
 * @author LILIBO
 * @since 2025-06-18
 */
@Tag(name = "系统用户表", description = "系统用户表数据")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("`sys_user`")
public class SysUser implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;

    /**
     * 密码
     */
    @Schema(description = "密码")
    private String password;

    /**
     * 昵称
     */
    @Schema(description = "昵称")
    private String nickname;

    /**
     * 头像地址
     */
    @Schema(description = "头像地址")
    private String avatar;

    /**
     * 性别 0-女;1-男
     */
    @Schema(description = "性别 0-女;1-男")
    private Integer sex;

    /**
     * 手机号码
     */
    @Schema(description = "手机号码")
    private String mobile;

    /**
     * 邮箱
     */
    @Schema(description = "邮箱")
    private String email;

    /**
     * 最后登录IP
     */
    @Schema(description = "最后登录IP")
    private String loginIp;

    /**
     * 最后登录时间
     */
    @Schema(description = "最后登录时间")
    private String loginDate;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 状态 0-正常;1-禁用
     */
    @Schema(description = "状态 0-正常;1-禁用")
    private Integer status;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private String createTime;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private String modifyTime;

    /**
     * 删除标记 0-正常;1-删除
     */
    @Schema(description = "删除标记 0-正常;1-删除")
    private Integer deleteFlag;

    /**
     * 带参构造方法
     */
    public SysUser(String username, String password, String nickname, String avatar, Integer sex, String mobile, String email, String loginIp, String loginDate, String remark, Integer status, String createTime, String modifyTime, Integer deleteFlag) {
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.avatar = avatar;
        this.sex = sex;
        this.mobile = mobile;
        this.email = email;
        this.loginIp = loginIp;
        this.loginDate = loginDate;
        this.remark = remark;
        this.status = status;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
        this.deleteFlag = deleteFlag;
    }

}
